const mongoose = require('mongoose')

const schema = new mongoose.Schema({
  name: {
    type: String,
    required: true,
    unique: true,
    index: true, // 创建索引
  },
  // 添加排序字段
  sort: {
    type: Number,
    default: 0, // 默认值可以根据需要设置
  }
});

module.exports = mongoose.model('NaviCategory', schema)
